home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Safarir 3
/
SafTV-CD3.iso
/
pc
/
Bonus
/
Dessins Animés
/
static
/
jeux
/
napman.swf
/
scripts
/
frame_332
/
DoAction.as
Wrap
Text File
|
2001-11-21
|
2KB
|
104 lines
if(mangiato1 == "0")
{
px4 = int(f1x / "4");
py4 = int(f1y / "4");
restox = f1x - px4 * "4";
restoy = f1y - py4 * "4";
if(restox == "0" and restoy == "0")
{
x = f1x;
y = f1y;
call("evaluate");
xv = f1vx;
yv = f1vy;
call("controlla");
if(ok == "1")
{
f1vx = xvs;
f1vy = yvs;
call("ruotafan");
}
}
setProperty("/f1", _X, f1x * "4" + "8");
setProperty("/f1", _Y, f1y * "4" + "8");
if(f1vx == "1")
{
pros = "3";
}
else
{
pros = "0";
}
if(f1vy == "1")
{
prosy = "3";
}
else
{
prosy = "0";
}
tpx = f1x + f1vx + pros;
tpy = f1y + f1vy + prosy;
cosa = eval("r" add int(tpy / "4")).substr(int(tpx / "4") + "1","1");
if(cosa ne "X" and cosa ne "T" and cosa ne "R")
{
f1x += f1vx;
f1y += f1vy;
}
else
{
x = f1x;
y = f1y;
call("evaluate");
f1vx = xvs;
f1vy = yvs;
call("ruotafan");
}
if((px - f1x) * (px - f1x) < "9" and (py - f1y) * (py - f1y) < "9")
{
if(status == "1")
{
score += "100";
mangiato1 = "1";
tellTarget("/f1")
{
gotoAndStop(9);
}
tellTarget("/suoni")
{
gotoAndStop("magna");
play();
}
}
else
{
gameover = "1";
}
}
}
else
{
if(f1y < "56")
{
f1y += "1";
}
if("56" < f1y)
{
f1y -= "1";
}
if("56" < f1x)
{
f1x -= "1";
}
if(f1x < "56")
{
f1x += "1";
}
setProperty("/f1", _X, f1x * "4" + "8");
setProperty("/f1", _Y, f1y * "4" + "8");
if(f1y == "56" and f1x == "56")
{
mangiato1 = "0";
}
}